package com.example.consumer.controller;

import com.example.consumer.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p></p>
 *
 * @author Shad0ws
 * <create>2022年7月1日23:00:40</create>
 */
@RestController
@RequestMapping("/consumer")
public class ConsumerController {

	@Autowired
	private ProviderService providerService;

	@RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)
	public String echo(@PathVariable String str) {
		return providerService.echo(str);
	}
}